import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询销售合同清单列表
export function listSalecont(query) {
  return request({
    url: '/erp/salecont/list',
    method: 'get',
    params: query
  })
}

// 查询销售合同清单详细
export function getSalecont(id) {
  return request({
    url: '/erp/salecont/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增销售合同清单
export function addSalecont(data) {
  return request({
    url: '/erp/salecont',
    method: 'post',
    data: data
  })
}

// 修改销售合同清单
export function updateSalecont(data) {
  return request({
    url: '/erp/salecont',
    method: 'put',
    data: data
  })
}

// 删除销售合同清单
export function delSalecont(id) {
  return request({
    url: '/erp/salecont/' + id,
    method: 'delete'
  })
}

// 启用销售合同清单
export function disableSalecont(data) {
  return request({
    url: '/erp/salecont/disable',
    method: 'post',
    data: data
  })
}

// 是否生效销售合同清单
export function effectSalecont(data) {
  return request({
    url: '/erp/salecont/effect',
    method: 'post',
    data: data
  })
}